package com.adobe.utils 
{
	public const FragmentShaderAssembler:FragmentShaderAssemblerImpl = new FragmentShaderAssemblerImpl();
}
import flash.display3D.Context3DProgramType;
import flash.utils.ByteArray;
import com.adobe.utils.AGALMiniAssembler
import flash.utils.Endian;

internal class FragmentShaderAssemblerImpl
{
	internal var mAgalAssembler:AGALMiniAssembler = new AGALMiniAssembler();
	public function Assemble(aAgalSrc:String): void
	{ 
		mAgalAssembler.assemble(Context3DProgramType.FRAGMENT, aAgalSrc, false); 
	}
	public function get ByteCode(): ByteArray 
	{ 
		var ba:ByteArray = new ByteArray()
		ba.endian = Endian.LITTLE_ENDIAN;
		mAgalAssembler.agalcode.position = 0;
		ba.writeBytes(mAgalAssembler.agalcode, 0, mAgalAssembler.agalcode.length);
		ba.position = 0;
		return ba; 
	} 
}